package com.cenwangkeji.resident.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.cenwangkeji.resident.R;
import com.cenwangkeji.resident.model.bean.ServicepackageEvaluateBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @松 on 2019/11/10 14:20
 * 服务包评价列表
 */
public class ServicePAckageEvaluateAdapter extends BaseQuickAdapter<ServicepackageEvaluateBean.DataBean, BaseViewHolder> {
    public ServicePAckageEvaluateAdapter( @Nullable List<ServicepackageEvaluateBean.DataBean> data) {
        super(R.layout.item_service_package_evaluate, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServicepackageEvaluateBean.DataBean item) {
         helper.setText(R.id.tv_name, "服务名称："+item.getName());
         helper.setText(R.id.tv_data, "日期："+item.getCreateDate());
         TextView tv = helper.getView(R.id.tv_state);//评价状态
         if (item.getEvaluateStatus()==1) {//已评价
             tv.setText("已评价");
         }else {
             tv.setText("未评价");
         }

    }
}
